From 5754d7f2c6f11dd83fd065aa0afa2a9d782d7242 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 18 Apr 1994 21:33:57 +0000 Subject: [PATCH] (menu-bar-enable-clipboard): Construct new cons cells. --- lisp/menu-bar.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 51686bfda3a..063854e1467 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -118,9 +118,14 @@ (defun menu-bar-enable-clipboard () "Make the menu bar CUT, PASTE and COPY items use the clipboard." (interactive) - (define-key menu-bar-edit-menu [paste] '("Paste" . clipboard-yank)) - (define-key menu-bar-edit-menu [copy] '("Copy" . clipboard-kill-ring-save)) - (define-key menu-bar-edit-menu [cut] '("Cut" . clipboard-kill-region))) + ;; We can't use constant list structure here because it becomes pure, + ;; and because it gets modified with cache data. + (define-key menu-bar-edit-menu [paste] + (cons "Paste" 'clipboard-yank)) + (define-key menu-bar-edit-menu [copy] + (cons "Copy" 'clipboard-kill-ring-save)) + (define-key menu-bar-edit-menu [cut] + (cons "Cut" 'clipboard-kill-region))) ;; Sun expects these commands on these keys, so why not? (define-key global-map [f20] 'clipboard-kill-region) -- 2.30.2